home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / bind.n < prev    next >
Text File  |  1995-07-25  |  35KB  |  525 lines

  1.  
  2.  
  3.  
  4.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           bind - Arrange for X events to invoke Tcl commands
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           bbbbiiiinnnndddd _w_i_n_d_o_w_S_p_e_c
  15.           bbbbiiiinnnndddd _w_i_n_d_o_w_S_p_e_c _s_e_q_u_e_n_c_e
  16.           bbbbiiiinnnndddd _w_i_n_d_o_w_S_p_e_c _s_e_q_u_e_n_c_e _c_o_m_m_a_n_d
  17.           bbbbiiiinnnndddd _w_i_n_d_o_w_S_p_e_c _s_e_q_u_e_n_c_e ++++_c_o_m_m_a_n_d
  18.      _________________________________________________________________
  19.  
  20.  
  21.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.           If all three arguments are specified, bbbbiiiinnnndddd will arrange  for
  23.           _c_o_m_m_a_n_d (a Tcl command) to be executed whenever the sequence
  24.           of  events  given  by  _s_e_q_u_e_n_c_e  occurs  in  the   window(s)  |
  25.           identified  by  _w_i_n_d_o_w_S_p_e_c.   If  _c_o_m_m_a_n_d is prefixed with a
  26.           ``+'', then it is  appended  to  any  existing  binding  for
  27.           _s_e_q_u_e_n_c_e;   otherwise _c_o_m_m_a_n_d replaces the existing binding,
  28.           if any.  If _c_o_m_m_a_n_d is an  empty  string  then  the  current
  29.           binding for _s_e_q_u_e_n_c_e is destroyed, leaving _s_e_q_u_e_n_c_e unbound.
  30.           In all of the cases where a _c_o_m_m_a_n_d  argument  is  provided,
  31.           bbbbiiiinnnndddd returns an empty string.
  32.  
  33.           If _s_e_q_u_e_n_c_e is specified without a _c_o_m_m_a_n_d, then the command
  34.           currently  bound to _s_e_q_u_e_n_c_e is returned, or an empty string
  35.           if there is no binding for _s_e_q_u_e_n_c_e.   If  neither  _s_e_q_u_e_n_c_e
  36.           nor  _c_o_m_m_a_n_d  is  specified, then the return value is a list
  37.           whose elements are all the sequences for which  there  exist  |
  38.           bindings for _w_i_n_d_o_w_S_p_e_c.                                      |
  39.  
  40.           The _w_i_n_d_o_w_S_p_e_c argument selects which window(s) the  binding  |
  41.           applies  to.  It may have one of three forms.  If _w_i_n_d_o_w_S_p_e_c  |
  42.           is the path name for a window, then the binding  applies  to  |
  43.           that  particular  window.   If  _w_i_n_d_o_w_S_p_e_c  is the name of a  |
  44.           class of widgets, then the binding applies to all widgets in  |
  45.           that  class.   Lastly, _w_i_n_d_o_w_S_p_e_c may have the value aaaallllllll, in  |
  46.           which case  the  binding  applies  to  all  windows  in  the  |
  47.           application.
  48.  
  49.           The _s_e_q_u_e_n_c_e argument specifies a sequence of  one  or  more
  50.           event  patterns,  with  optional  white  space  between  the
  51.           patterns.  Each event pattern may take either of two  forms.
  52.           In   the  simplest  case  it  is  a  single  printing  ASCII
  53.           character, such as aaaa or [[[[.  The character may not be a space
  54.           character  or the character <<<<.  This form of pattern matches
  55.           a KKKKeeeeyyyyPPPPrrrreeeessssssss event for the particular character.   The  second
  56.           form  of  pattern  is  longer  but more general.  It has the
  57.           following syntax:
  58.  
  59.                <<<<_m_o_d_i_f_i_e_r-_m_o_d_i_f_i_e_r-_t_y_p_e-_d_e_t_a_i_l>>>>
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  71.  
  72.  
  73.  
  74.           The entire event pattern is surrounded  by  angle  brackets.
  75.           Inside  the  angle  brackets  are zero or more modifiers, an
  76.           event type, and  an  extra  piece  of  information  (_d_e_t_a_i_l)
  77.           identifying  a  particular  button  or  keysym.   Any of the
  78.           fields may be omitted, as long as at least one of  _t_y_p_e  and
  79.           _d_e_t_a_i_l  is  present.   The fields must be separated by white
  80.           space or dashes.
  81.  
  82.           Modifiers may consist of any of the values in the  following
  83.           list:
  84.  
  85.                CCCCoooonnnnttttrrrroooollll                 AAAAnnnnyyyy
  86.                SSSShhhhiiiifffftttt                   DDDDoooouuuubbbblllleeee
  87.                LLLLoooocccckkkk                    TTTTrrrriiiipppplllleeee
  88.                BBBBuuuuttttttttoooonnnn1111,,,, BBBB1111             MMMMoooodddd1111,,,, MMMM1111,,,, MMMMeeeettttaaaa,,,, MMMM                |
  89.                BBBBuuuuttttttttoooonnnn2222,,,, BBBB2222             MMMMoooodddd2222,,,, MMMM2222,,,, AAAAlllltttt                    |
  90.                BBBBuuuuttttttttoooonnnn3333,,,, BBBB3333             MMMMoooodddd3333,,,, MMMM3333
  91.                BBBBuuuuttttttttoooonnnn4444,,,, BBBB4444             MMMMoooodddd4444,,,, MMMM4444
  92.                BBBBuuuuttttttttoooonnnn5555,,,, BBBB5555             MMMMoooodddd5555,,,, MMMM5555
  93.           Where more than one value is listed,  separated  by  commas,
  94.           the  values  are  equivalent.    All of the modifiers except
  95.           AAAAnnnnyyyy, DDDDoooouuuubbbblllleeee, and TTTTrrrriiiipppplllleeee have the obvious  X  meanings.   For
  96.           example,  BBBBuuuuttttttttoooonnnn1111  requires  that button 1 be depressed when
  97.           the event occurs.  Under normal conditions  the  button  and
  98.           modifier  state  at the time of the event must match exactly
  99.           those specified in the bbbbiiiinnnndddd command.  If  no  modifiers  are
  100.           specified,  then  events will match only if no modifiers are
  101.           present.  If the AAAAnnnnyyyy modifier is specified, then  additional
  102.           modifiers may be present besides those specified explicitly.
  103.           For example, if button 1 is  pressed  while  the  shift  and
  104.           control  keys are down, the specifier <<<<AAAAnnnnyyyy----CCCCoooonnnnttttrrrroooollll----BBBBuuuuttttttttoooonnnn----1111>>>>
  105.           will match the event, but the  specifier  <<<<CCCCoooonnnnttttrrrroooollll----BBBBuuuuttttttttoooonnnn----1111>>>>
  106.           will not.
  107.  
  108.           The DDDDoooouuuubbbblllleeee  and  TTTTrrrriiiipppplllleeee  modifiers  are  a  convenience  for
  109.           specifying  double  mouse  clicks and other repeated events.
  110.           They cause a particular event pattern to be repeated 2 or  3
  111.           times,  and  also  place a time and space requirement on the
  112.           sequence:  for a sequence of events to  match  a  DDDDoooouuuubbbblllleeee  or
  113.           TTTTrrrriiiipppplllleeee  pattern, all of the events must occur close together
  114.           in time and without substantial  mouse  motion  in  between.
  115.           For  example,  <<<<DDDDoooouuuubbbblllleeee----BBBBuuuuttttttttoooonnnn----1111>>>>  is  equivalent to <<<<BBBBuuuuttttttttoooonnnn----
  116.           1111>>>><<<<BBBBuuuuttttttttoooonnnn----1111>>>> with the extra time and space requirement.
  117.  
  118.           The _t_y_p_e field may be any of the  standard  X  event  types,
  119.           with  a few extra abbreviations.  Below is a list of all the
  120.           valid types;  where  two  name  appear  together,  they  are
  121.           synonyms.
  122.  
  123.                BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss,,,, BBBBuuuuttttttttoooonnnn EEEExxxxppppoooosssseeee             LLLLeeeeaaaavvvveeee
  124.                BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee       FFFFooooccccuuuussssIIIInnnn            MMMMaaaapppp
  125.                CCCCiiiirrrrccccuuuullllaaaatttteeee           FFFFooooccccuuuussssOOOOuuuutttt           PPPPrrrrooooppppeeeerrrrttttyyyy
  126.  
  127.  
  128.      Page 2                                          (printed 7/23/95)
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  136.  
  137.  
  138.  
  139.                CCCCiiiirrrrccccuuuullllaaaatttteeeeRRRReeeeqqqquuuueeeesssstttt    GGGGrrrraaaavvvviiiittttyyyy            RRRReeeeppppaaaarrrreeeennnntttt
  140.                CCCCoooolllloooorrrrmmmmaaaapppp            KKKKeeeeyyyymmmmaaaapppp             RRRReeeessssiiiizzzzeeeeRRRReeeeqqqquuuueeeesssstttt
  141.                CCCCoooonnnnffffiiiigggguuuurrrreeee           KKKKeeeeyyyyPPPPrrrreeeessssssss,,,, KKKKeeeeyyyy      UUUUnnnnmmmmaaaapppp
  142.                CCCCoooonnnnffffiiiigggguuuurrrreeeeRRRReeeeqqqquuuueeeesssstttt    KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee         VVVViiiissssiiiibbbbiiiilllliiiittttyyyy        ||||
  143.                DDDDeeeessssttttrrrrooooyyyy             MMMMaaaappppRRRReeeeqqqquuuueeeesssstttt
  144.                EEEEnnnntttteeeerrrr               MMMMoooottttiiiioooonnnn
  145.           The last part of a long event specification is  _d_e_t_a_i_l.   In
  146.           the  case of a BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss or BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee event, it is the
  147.           number of a button (1-5).  If a button number is given, then
  148.           only  an  event on that particular button will match;  if no
  149.           button number is given, then an event  on  any  button  will
  150.           match.   Note:  giving a specific button number is different
  151.           than specifying a button modifier; in  the  first  case,  it
  152.           refers  to  a button being pressed or released, while in the
  153.           second it refers  to  some  other  button  that  is  already
  154.           depressed  when  the  matching  event  occurs.   If a button
  155.           number is given then _t_y_p_e may be omitted:  if  will  default
  156.           to   BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss.    For   example,  the  specifier  <<<<1111>>>>  is
  157.           equivalent to <<<<BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss----1111>>>>.
  158.  
  159.           If the event type is KKKKeeeeyyyyPPPPrrrreeeessssssss or KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, then _d_e_t_a_i_l may
  160.           be  specified  in  the  form  of  an  X keysym.  Keysyms are
  161.           textual specifications for particular keys on the  keyboard;
  162.           they  include  all  the  alphanumeric ASCII characters (e.g.
  163.           ``a'' is the keysym for the  ASCII  character  ``a''),  plus
  164.           descriptions  for  non-alphanumeric characters (``comma'' is
  165.           the keysym for the comma character), plus  descriptions  for
  166.           all  the  non-ASCII keys on the keyboard (``Shift_L'' is the
  167.           keysm for the left shift key, and ``F1'' is the  keysym  for
  168.           the  F1  function  key, if it exists).  The complete list of
  169.           keysyms is not presented here;  it should  be  available  in
  170.           other  X  documentation.   If  necessary, you can use the %%%%KKKK
  171.           notation described below to print out the keysym name for an
  172.           arbitrary  key.   If a keysym _d_e_t_a_i_l is given, then the _t_y_p_e
  173.           field may be omitted;  it will  default  to  KKKKeeeeyyyyPPPPrrrreeeessssssss.   For
  174.           example,   <<<<CCCCoooonnnnttttrrrroooollll----ccccoooommmmmmmmaaaa>>>>   is   equivalent   to  <<<<CCCCoooonnnnttttrrrroooollll----
  175.           KKKKeeeeyyyyPPPPrrrreeeessssssss----ccccoooommmmmmmmaaaa>>>>.  If a keysym _d_e_t_a_i_l is specified  then  the
  176.           SSSShhhhiiiifffftttt  modifier need not be specified and will be ignored if
  177.           specified:  each keysym already implies a  particular  state
  178.           for the shift key.
  179.  
  180.           The _c_o_m_m_a_n_d argument to bbbbiiiinnnndddd is a Tcl command string,  which
  181.           will  be  executed whenever the given event sequence occurs.
  182.           _C_o_m_m_a_n_d will be executed in the same  interpreter  that  the
  183.           bbbbiiiinnnndddd  command  was  executed  in.  If _c_o_m_m_a_n_d contains any %%%%
  184.           characters, then the command string  will  not  be  executed
  185.           directly.   Instead,  a new command string will be generated
  186.           by replacing each %%%%, and the character  following  it,  with
  187.           information from the current event.  The replacement depends
  188.           on the character following the %%%%, as  defined  in  the  list
  189.           below.   Unless  otherwise indicated, the replacement string  |
  190.  
  191.  
  192.      Page 3                                          (printed 7/23/95)
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  200.  
  201.  
  202.  
  203.           is the decimal value of the given  field  from  the  current  |
  204.           event.  Some of the substitutions are only valid for certain
  205.           types of events;  if they are used for other types of events
  206.           the value substituted is undefined.
  207.  
  208.           %%%%%%%%   Replaced with a single percent.
  209.  
  210.           %%%%####   The number of the last client request processed by  the
  211.                server  (the  _s_e_r_i_a_l  field from the event).  Valid for
  212.                all event types.
  213.  
  214.           %%%%aaaa   The  _a_b_o_v_e  field  from  the  event.   Valid  only  for
  215.                CCCCoooonnnnffffiiiigggguuuurrrreeeeNNNNoooottttiiiiffffyyyy events.
  216.  
  217.           %%%%bbbb   The number of the button that was pressed or  released.
  218.                Valid only for BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss and BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee events.
  219.  
  220.           %%%%cccc   The _c_o_u_n_t field from the event.  Valid only for EEEExxxxppppoooosssseeee,
  221.                GGGGrrrraaaapppphhhhiiiiccccssssEEEExxxxppppoooosssseeee, and MMMMaaaappppppppiiiinnnnggggNNNNoooottttiiiiffffyyyy events.
  222.  
  223.           %%%%dddd   The _d_e_t_a_i_l field from the event.  The %%%%dddd is replaced by
  224.                a  string  identifying  the  detail.   For EEEEnnnntttteeeerrrrNNNNoooottttiiiiffffyyyy,
  225.                LLLLeeeeaaaavvvveeeeNNNNoooottttiiiiffffyyyy, FFFFooooccccuuuussssIIIInnnn, and FFFFooooccccuuuussssOOOOuuuutttt events,  the  string
  226.                will be one of the following:
  227.  
  228.                     NNNNoooottttiiiiffffyyyyAAAAnnnncccceeeessssttttoooorrrr          NNNNoooottttiiiiffffyyyyNNNNoooonnnnlllliiiinnnneeeeaaaarrrrVVVViiiirrrrttttuuuuaaaallll
  229.                     NNNNoooottttiiiiffffyyyyDDDDeeeettttaaaaiiiillllNNNNoooonnnneeee        NNNNoooottttiiiiffffyyyyPPPPooooiiiinnnntttteeeerrrr
  230.                     NNNNoooottttiiiiffffyyyyIIIInnnnffffeeeerrrriiiioooorrrr          NNNNoooottttiiiiffffyyyyPPPPooooiiiinnnntttteeeerrrrRRRRooooooootttt
  231.                     NNNNoooottttiiiiffffyyyyNNNNoooonnnnlllliiiinnnneeeeaaaarrrr         NNNNoooottttiiiiffffyyyyVVVViiiirrrrttttuuuuaaaallll
  232.                For CCCCoooonnnnffffiiiigggguuuurrrreeeeRRRReeeeqqqquuuueeeesssstttt  events,  the  substituted  string
  233.                will be one of the following:
  234.  
  235.                     AAAAbbbboooovvvveeee                   OOOOppppppppoooossssiiiitttteeee
  236.                     BBBBeeeelllloooowwww                   TTTTooooppppIIIIffff
  237.                     BBBBoooottttttttoooommmmIIIIffff
  238.                For events other than these, the substituted string  is
  239.                undefined.
  240.  
  241.           %%%%ffff   The _f_o_c_u_s field from the event (0000 or  1111).   Valid  only
  242.                for EEEEnnnntttteeeerrrrNNNNoooottttiiiiffffyyyy and LLLLeeeeaaaavvvveeeeNNNNoooottttiiiiffffyyyy events.
  243.  
  244.           %%%%hhhh   The _h_e_i_g_h_t  field  from  the  event.   Valid  only  for
  245.                CCCCoooonnnnffffiiiigggguuuurrrreeee, CCCCoooonnnnffffiiiigggguuuurrrreeeeNNNNoooottttiiiiffffyyyy, EEEExxxxppppoooosssseeee, GGGGrrrraaaapppphhhhiiiiccccssssEEEExxxxppppoooosssseeee, and
  246.                RRRReeeessssiiiizzzzeeeeRRRReeeeqqqquuuueeeesssstttt events.
  247.  
  248.           %%%%kkkk   The _k_e_y_c_o_d_e field  from  the  event.   Valid  only  for
  249.                KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee events.
  250.  
  251.           %%%%mmmm   The _m_o_d_e field from the event.  The substituted  string
  252.                is  one  of  NNNNoooottttiiiiffffyyyyNNNNoooorrrrmmmmaaaallll, NNNNoooottttiiiiffffyyyyGGGGrrrraaaabbbb, NNNNoooottttiiiiffffyyyyUUUUnnnnggggrrrraaaabbbb, or
  253.                NNNNoooottttiiiiffffyyyyWWWWhhhhiiiilllleeeeGGGGrrrraaaabbbbbbbbeeeedddd.   Valid   only   for   EEEEnnnntttteeeerrrrWWWWiiiinnnnddddoooowwww,
  254.  
  255.  
  256.  
  257.      Page 4                                          (printed 7/23/95)
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  265.  
  266.  
  267.  
  268.                FFFFooooccccuuuussssIIIInnnn, FFFFooooccccuuuussssOOOOuuuutttt, and LLLLeeeeaaaavvvveeeeWWWWiiiinnnnddddoooowwww events.
  269.  
  270.           %%%%oooo   The _o_v_e_r_r_i_d_e__r_e_d_i_r_e_c_t field from the event.  Valid only
  271.                for   CCCCrrrreeeeaaaatttteeeeNNNNoooottttiiiiffffyyyy,   MMMMaaaappppNNNNoooottttiiiiffffyyyy,   RRRReeeeppppaaaarrrreeeennnnttttNNNNoooottttiiiiffffyyyy,  and
  272.                CCCCoooonnnnffffiiiigggguuuurrrreeeeNNNNoooottttiiiiffffyyyy events.
  273.  
  274.           %%%%pppp   The _p_l_a_c_e field from the event, substituted as  one  of
  275.                the  strings  PPPPllllaaaacccceeeeOOOOnnnnTTTToooopppp  or PPPPllllaaaacccceeeeOOOOnnnnBBBBoooottttttttoooommmm.  Valid only
  276.                for CCCCiiiirrrrccccuuuullllaaaatttteeeeNNNNoooottttiiiiffffyyyy and CCCCiiiirrrrccccuuuullllaaaatttteeeeRRRReeeeqqqquuuueeeesssstttt events.
  277.  
  278.           %%%%ssss   The _s_t_a_t_e  field  from  the  event.   For  BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss,
  279.                BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee,   EEEEnnnntttteeeerrrrNNNNoooottttiiiiffffyyyy,   KKKKeeeeyyyyPPPPrrrreeeessssssss,   KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee,
  280.                LLLLeeeeaaaavvvveeeeNNNNoooottttiiiiffffyyyy, and MMMMoooottttiiiioooonnnnNNNNoooottttiiiiffffyyyy events, a decimal  string  |
  281.                is  substituted.   For  VVVViiiissssiiiibbbbiiiilllliiiittttyyyyNNNNoooottttiiiiffffyyyy,  one  of  the
  282.                strings                           VVVViiiissssiiiibbbbiiiilllliiiittttyyyyUUUUnnnnoooobbbbssssccccuuuurrrreeeedddd,
  283.                VVVViiiissssiiiibbbbiiiilllliiiittttyyyyPPPPaaaarrrrttttiiiiaaaallllllllyyyyOOOObbbbssssccccuuuurrrreeeedddd,                        and
  284.                VVVViiiissssiiiibbbbiiiilllliiiittttyyyyFFFFuuuullllllllyyyyOOOObbbbssssccccuuuurrrreeeedddd is substituted.
  285.  
  286.           %%%%tttt   The _t_i_m_e field from the event.  Valid only  for  events
  287.                that contain a _t_i_m_e field.
  288.  
  289.           %%%%vvvv   The _v_a_l_u_e__m_a_s_k field from the event.   Valid  only  for
  290.                CCCCoooonnnnffffiiiigggguuuurrrreeeeRRRReeeeqqqquuuueeeesssstttt events.
  291.  
  292.           %%%%wwww   The  _w_i_d_t_h  field  from  the  event.   Valid  only  for
  293.                CCCCoooonnnnffffiiiigggguuuurrrreeee,  CCCCoooonnnnffffiiiigggguuuurrrreeeeRRRReeeeqqqquuuueeeesssstttt,  EEEExxxxppppoooosssseeee,  GGGGrrrraaaapppphhhhiiiiccccssssEEEExxxxppppoooosssseeee,
  294.                and RRRReeeessssiiiizzzzeeeeRRRReeeeqqqquuuueeeesssstttt events.
  295.  
  296.           %%%%xxxx   The _x field from the  event.   Valid  only  for  events
  297.                containing an _x field.
  298.  
  299.           %%%%yyyy   The _y field from the  event.   Valid  only  for  events
  300.                containing a _y field.
  301.  
  302.           %%%%AAAA   Substitutes the ASCII character  corresponding  to  the
  303.                event,  or  the  empty  string  if  the  event  doesn't
  304.                correspond to an ASCII character (e.g.  the  shift  key
  305.                was  pressed).   XXXXLLLLooooooookkkkuuuuppppSSSSttttrrrriiiinnnngggg  does  all  the  work of
  306.                translating from  the  event  to  an  ASCII  character.
  307.                Valid only for KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee events.
  308.  
  309.           %%%%BBBB   The _b_o_r_d_e_r__w_i_d_t_h field from the event.  Valid only  for
  310.                CCCCoooonnnnffffiiiigggguuuurrrreeeeNNNNoooottttiiiiffffyyyy and CCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww events.
  311.  
  312.           %%%%DDDD   The _d_i_s_p_l_a_y field from the event.  Valid for all  event
  313.                types.
  314.  
  315.           %%%%EEEE   The _s_e_n_d__e_v_e_n_t field from the  event.   Valid  for  all
  316.                event types.
  317.  
  318.           %%%%KKKK   The keysym corresponding to the event, substituted as a
  319.                textual string.  Valid only for KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee
  320.  
  321.  
  322.  
  323.      Page 5                                          (printed 7/23/95)
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  331.  
  332.  
  333.  
  334.                events.
  335.  
  336.           %%%%NNNN   The keysym corresponding to the event, substituted as a  |
  337.                decimal number.  Valid only for KKKKeeeeyyyyPPPPrrrreeeessssssss and KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee
  338.                events.
  339.  
  340.           %%%%RRRR   The _r_o_o_t window identifier from the event.  Valid  only
  341.                for events containing a _r_o_o_t field.
  342.  
  343.           %%%%SSSS   The _s_u_b_w_i_n_d_o_w window identifier from the event.   Valid
  344.                only for events containing a _s_u_b_w_i_n_d_o_w field.
  345.  
  346.           %%%%TTTT   The _t_y_p_e field from the event.   Valid  for  all  event
  347.                types.
  348.  
  349.           %%%%WWWW   The path name of the window  to  which  the  event  was
  350.                reported  (the _w_i_n_d_o_w field from the event).  Valid for
  351.                all event types.
  352.  
  353.           %%%%XXXX   The _x__r_o_o_t field from the  event.   If  a  virtual-root  |
  354.                window manager is being used then the substituted value  |
  355.                is the corresponding x-coordinate in the virtual  root.
  356.                Valid  only  for  BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss, BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee, KKKKeeeeyyyyPPPPrrrreeeessssssss,
  357.                KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, and MMMMoooottttiiiioooonnnnNNNNoooottttiiiiffffyyyy events.
  358.  
  359.           %%%%YYYY   The _y__r_o_o_t field from the  event.   If  a  virtual-root  |
  360.                window manager is being used then the substituted value  |
  361.                is the corresponding y-coordinate in the virtual  root.
  362.                Valid  only  for  BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss, BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee, KKKKeeeeyyyyPPPPrrrreeeessssssss,
  363.                KKKKeeeeyyyyRRRReeeelllleeeeaaaasssseeee, and MMMMoooottttiiiioooonnnnNNNNoooottttiiiiffffyyyy events.
  364.  
  365.           If the  replacement  string  for  a  %-replacement  contains  |
  366.           characters  that are interpreted specially by the Tcl parser  |
  367.           (such  as  backslashes  or  square   brackets   or   spaces)  |
  368.           additional  backslashes are added during replacement so that  |
  369.           the result after parsing is the original replacement string.  |
  370.           For example, if _c_o_m_m_a_n_d is                                    |
  371.  
  372.                iiiinnnnsssseeeerrrrtttt %%%%AAAA                                                |
  373.           and the character typed is an open square bracket, then  the  |
  374.           command actually executed will be                             |
  375.  
  376.                iiiinnnnsssseeeerrrrtttt \\\\[[[[                                                |
  377.           This  will  cause  the  iiiinnnnsssseeeerrrrtttt  to  receive   the   original  |
  378.           replacement  string  (open  square  bracket)  as  its  first  |
  379.           argument.  If the extra backslash  hadn't  been  added,  Tcl  |
  380.           would not have been able to parse the command correctly.
  381.  
  382.           At most one binding will trigger for any given X event.   If
  383.           several  bindings match the recent events, the most specific
  384.           binding is chosen and its command  will  be  executed.   The
  385.  
  386.  
  387.  
  388.      Page 6                                          (printed 7/23/95)
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  396.  
  397.  
  398.  
  399.           following tests are applied, in order, to determine which of
  400.           several matching sequences is more specific: (a)  a  binding  |
  401.           whose  _w_i_n_d_o_w_S_p_e_c names a particular window is more specific  |
  402.           than a binding for a class, which is more  specific  than  a  |
  403.           binding  whose  _w_i_n_d_o_w_S_p_e_c is aaaallllllll; (b) a longer sequence (in
  404.           terms of number of events matched) is more specific  than  a
  405.           shorter  sequence;  (c)  an  event  pattern that specifies a
  406.           specific button or  key  is  more  specific  than  one  that
  407.           doesn't;   (e)  an  event pattern that requires a particular
  408.           modifier is more specific than one that doesn't require  the
  409.           modifier;  (e)  an event pattern specifying the AAAAnnnnyyyy modifier
  410.           is less specific than one that  doesn't.   If  the  matching
  411.           sequences  contain  more  than one event, then tests (c)-(e)
  412.           are applied in order from the most recent event to the least
  413.           recent  event  in  the  sequences.   If  these tests fail to
  414.           determine  a  winner,  then  the  most  recently  registered
  415.           sequence is the winner.
  416.  
  417.           If an X event does not match any of the  existing  bindings,
  418.           then   the  event  is  ignored  (an  unbound  event  is  not
  419.           considered to be an error).
  420.  
  421.           When a _s_e_q_u_e_n_c_e specified in a bbbbiiiinnnndddd  command  contains  more
  422.           than  one  event  pattern,  then  its  command  is  executed
  423.           whenever the recent events (leading up to and including  the
  424.           current  event)  match  the given sequence.  This means, for
  425.           example, that if button 1 is clicked repeatedly the sequence
  426.           <<<<DDDDoooouuuubbbblllleeee----BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss----1111>>>>  will match each button press but the
  427.           first.  If extraneous events  that  would  prevent  a  match  |
  428.           occur in the middle of an event sequence then the extraneous  |
  429.           events are ignored unless they are KKKKeeeeyyyyPPPPrrrreeeessssssss  or  BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss  |
  430.           events.   For  example,  <<<<DDDDoooouuuubbbblllleeee----BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss----1111>>>> will match a  |
  431.           sequence of presses of button 1, even though there  will  be  |
  432.           BBBBuuuuttttttttoooonnnnRRRReeeelllleeeeaaaasssseeee  events  (and  possibly  MMMMoooottttiiiioooonnnnNNNNoooottttiiiiffffyyyy  events)  |
  433.           between the BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss  events.   Furthermore,  a  KKKKeeeeyyyyPPPPrrrreeeessssssss  |
  434.           event may be preceded by any number of other KKKKeeeeyyyyPPPPrrrreeeessssssss events  |
  435.           for modifier keys without the  modifier  keys  preventing  a  |
  436.           match.   For  example,  the  event  sequence aaaaBBBB will match a  |
  437.           press of the aaaa key, a release of the aaaa key, a press  of  the  |
  438.           SSSShhhhiiiifffftttt  key, and a press of the bbbb key:  the press of SSSShhhhiiiifffftttt is  |
  439.           ignored because it is a modifier key.  Finally,  if  several
  440.           MMMMoooottttiiiioooonnnnNNNNoooottttiiiiffffyyyy  events  occur  in  a row, only the last one is
  441.           used for purposes of matching binding sequences.
  442.  
  443.           If an error occurs in executing the command  for  a  binding
  444.           then the ttttkkkkeeeerrrrrrrroooorrrr mechanism is used to report the error.  The  |
  445.           command will  be  executed  at  global  level  (outside  the  |
  446.           context of any Tcl procedure).
  447.  
  448.  
  449.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  450.           tkerror
  451.  
  452.  
  453.  
  454.      Page 7                                          (printed 7/23/95)
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.      bbbbiiiinnnndddd((((nnnn))))                      TTTTkkkk (((( ))))                       bbbbiiiinnnndddd((((nnnn))))
  462.  
  463.  
  464.  
  465.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  466.           form, manual
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.      Page 8                                          (printed 7/23/95)
  521.  
  522.  
  523.  
  524.